import { cloneDeep } from 'lodash';
import videoPlayerCompImg from '@/visual/assets/img/dashboard/video-player-comp.png';
import { visualComponentConfig, visualComponentGroup } from './base-config';
import { mediaPreloadConst, mediaSourceConst, pictureBoxSourceConst } from '@/visual/commons/consts/dashboard-const';
import CommonUtil from '@/visual/commons/utils/common-util';




/**
 * H5视频播放器
 */
const videoPlayerCompConfig = {
    key: 'fd80d6efadsd7',
    compId:'hvVideoPlayer'+CommonUtil.shortUUID(),
    name: 'hvVideoPlayer',
    group: visualComponentGroup.base.value,
    label: 'H5视频播放器',
    img: videoPlayerCompImg,
    propertyComponent: 'hvVideoPlayerProperty',
    componentStyleGeneratorName: 'hvCommonStyleGenerator',
    ...cloneDeep(visualComponentConfig.options),
    componentDimensions: {
        width: 500,
        height: 300,
    },
    componentProps: {
        sourceList: [
            {
                src: '',
                sourceType: mediaSourceConst.url,
            },
        ],
        autoplay: false,
        controls: true,
        loop: true,
        muted: false,
        preload: mediaPreloadConst.none,
        posterSourceType: pictureBoxSourceConst.default,
        poster: '',
    },
};

/**
 * 配置 
 */
export {
    videoPlayerCompConfig
}
